from web import models
from django.template import Library

register = Library()


@register.filter
def color(num):
    return models.TransationRecord.charge_type_class_mapping[num]
